package com.sny.service;

import com.sny.dto.FileUploadDTO;
import com.sny.model.FileStorageModel;
import com.sny.vo.param.FileUploadRequestParam;

import java.io.IOException;
import java.util.List;

public interface IFileService {
    /**
     * @param fileUploadRequestParam
     * @return com.ylclouds.fileservice.upload.dto.FileUploadDTO
     * @author wangkesheng
     * @description 直接上传
     * @date 2020/7/3 15:29
     */
    FileUploadDTO upload(FileUploadRequestParam fileUploadRequestParam) throws IOException;

    /**
     * @param fileUploadRequestParam
     * @return com.ylclouds.fileservice.upload.dto.FileUploadDTO
     * @author wangkesheng
     * @description 分片上传
     * @date 2020/7/3 15:29
     */
    FileUploadDTO sliceUpload(FileUploadRequestParam fileUploadRequestParam);

    /**
     * @param fileUploadRequestParam
     * @return com.ylclouds.fileservice.upload.dto.FileUploadDTO
     * @author wangkesheng
     * @description 前端上传文件前调用此方法，根据文件MD5信息校验文件上传状态 文件未上传 文件已上传 文件上传了一部分
     * @date 2020/7/3 15:29
     */
    FileUploadDTO checkFileMd5(FileUploadRequestParam fileUploadRequestParam) throws IOException;

    /**
     * @param fileServiceDownloadUrl
     * @param preViewServiceUrl
     * @param fileId
     * @param suffix
     * @return void
     * @author wangkesheng
     * @description 加入预览服务队列
     * @date 2020/8/22 14:16
     */
    void preViewTask(String fileServiceDownloadUrl,String preViewServiceUrl,String fileId, String suffix);
}
